﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenQA.Selenium;
using SeleniumExtension.WebDriver; 

namespace SeleniumExtension.Services
{
    public class MockDynaObject
    {
        [Obsolete("Sample object that replicate dynamic code",false)]
        public static void Run()
        {
            try
            {
                var baseUrl = "http://www.google.com";
                InternetExplorer.Instance.Navigate().GoToUrl(baseUrl);
                Features.TakeScreenshot.Snap(InternetExplorer.Instance,Utilities.Utilities.GetFileName(baseUrl));
                InternetExplorer.Instance.FindElement(By.Id("q")).SendKeys("google");
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                InternetExplorer.Instance.Close();
                InternetExplorer.Instance.Quit();
            }
        }
    }
}
